%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%   Copyright (C) 2010 Alessio Stalla (alessiostalla@gmail.com)
%
%   This file is part of PrettyProlog.
%
%   PrettyProlog is free software; you can redistribute it and/or modify
%   it under the terms of the GNU General Public License as published by
%   the Free Software Foundation; either version 2 of the License, or
%   (at your option) any later version.
%
%   PrettyProlog is distributed in the hope that it will be useful,
%   but WITHOUT ANY WARRANTY; without even the implied warranty of
%   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
%   GNU General Public License for more details.
%
%   You should have received a copy of the GNU General Public License
%   along with PrettyProlog; if not, write to the Free Software
%   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
%
%   See the file COPYING for further details.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%% SYSTEM PREDICATES INIT %%%%%%%%%%%%%%%%%%%%%%%%%%%%

:- syspred(namespace, _, 'prettyprolog.engine.syspreds.Namespace').
:- syspred(define_namespace, _, 'prettyprolog.engine.syspreds.DefineNamespace').

:- syspred(consult, _, 'prettyprolog.engine.syspreds.Consult').

:- syspred(infix, _, 'prettyprolog.engine.syspreds.Infix').
		
:- syspred(true, _, 'prettyprolog.engine.syspreds.True').
:- syspred(fail, _, 'prettyprolog.engine.syspreds.Fail').

:- syspred(assert, _, 'prettyprolog.engine.syspreds.Assert').
:- syspred(asserta, _, 'prettyprolog.engine.syspreds.Asserta').
:- syspred(retract, _, 'prettyprolog.engine.syspreds.Retract').

:- syspred(read, _, 'prettyprolog.engine.syspreds.Read').
:- syspred(write, _, 'prettyprolog.engine.syspreds.Write').
:- syspred(nl, _, 'prettyprolog.engine.syspreds.Nl').

:- infix('=', true).
:- syspred('=', _, 'prettyprolog.engine.syspreds.Unif').

:- infix('\=', true).
:- syspred('\=', _, 'prettyprolog.engine.syspreds.NotUnif').

:- infix('==', true).
:- syspred('==', _, 'prettyprolog.engine.syspreds.Equals').

:- infix('\==', true).
:- syspred('\==', _, 'prettyprolog.engine.syspreds.NotEquals').

:- infix('#>', true).
:- syspred('#>', _, 'prettyprolog.engine.syspreds.Maggiore').

:- infix('#>=', true).
:- syspred('#>=', _, 'prettyprolog.engine.syspreds.MaggioreUg').

:- infix('#<', true).
:- syspred('#<', _, 'prettyprolog.engine.syspreds.Minore').

:- infix('#=<', true).
:- syspred('#=<', _, 'prettyprolog.engine.syspreds.MinoreUg').

:- infix('#<', true).
:- syspred('#<', _, 'prettyprolog.engine.syspreds.Minore').

:- infix('#=', true).
:- syspred('#=', _, 'prettyprolog.engine.syspreds.Uguale').

:- infix('#\=', true).
:- syspred('#\=', _, 'prettyprolog.engine.syspreds.Diverso').

:- syspred('domain', _, 'prettyprolog.engine.syspreds.Domini').

:- syspred('labeling', _, 'prettyprolog.engine.syspreds.Labeling').

:- syspred(functor, _, 'prettyprolog.engine.syspreds.Functor').
:- syspred(arg, _, 'prettyprolog.engine.syspreds.Arg').

:- syspred(var, _, 'prettyprolog.engine.syspreds.Var').
:- syspred(nonvar, _, 'prettyprolog.engine.syspreds.NonVar').
:- syspred(compound, _, 'prettyprolog.engine.syspreds.Compound').
:- syspred(constant, _, 'prettyprolog.engine.syspreds.Constant').

%%% Functions %%%

:- syspred(function, _, 'prettyprolog.engine.syspreds.Function').
:- syspred(apply, _, 'prettyprolog.engine.syspreds.Apply').
:- infix(is, false).
:- syspred(is, _, 'prettyprolog.engine.syspreds.Is').

:- infix('+', true).
:- function(+, 'prettyprolog.engine.functions.Plus').

:- infix('-', true).
:- function(-, 'prettyprolog.engine.functions.Minus').

:- infix('*', true).
:- function(*, 'prettyprolog.engine.functions.Times').

:- infix('/', true).
:- function(/, 'prettyprolog.engine.functions.DividedBy').

%%%%%%%%%%%%%%%%%

:- syspred(set_frame_value, _, 'prettyprolog.engine.syspreds.SetFrameValue').
:- syspred(get_frame_value, _, 'prettyprolog.engine.syspreds.GetFrameValue').
